package com.soft.javase.day08;

import java.util.Arrays;

/**
 * @author yzg
 * @desc TODO
 * @date 2025/4/27
 */
public class Sort {
    public static void main(String[] args) {
        String str = "9 10 12   6   8 15";

        String[] numberString = str.split("\\s+");

        int[] number = new int[numberString.length];
        for (int i = 0; i < numberString.length; i++) {
            number[i] = Integer.parseInt(numberString[i]);
        }

        String[] space = str.split("\\d+");

        Arrays.sort(number);

        String result = "";
        for (int i = 0; i < number.length; i++) {
              result += space[i] + number[i];
        }
        System.out.println(result);
    }

}
